/**
 * Copyright &copy; 2012-2014 <a href="https://github.com/thinkgem/jeesite">JeeSite</a> All rights reserved.
 */
package com.thinkgem.jeesite.modules.warehouse.entity;

import org.hibernate.validator.constraints.Length;

import java.util.Date;

import com.fasterxml.jackson.annotation.JsonFormat;

import javax.validation.constraints.NotNull;

import com.thinkgem.jeesite.common.persistence.DataEntity;
import com.thinkgem.jeesite.common.utils.DateUtils;
import com.thinkgem.jeesite.common.utils.excel.annotation.ExcelField;

/**
 * 仓库KPI监控Entity
 * 
 * @author hui.li
 * @version 2016-12-23
 */
public class BIWarehouseKpiData extends DataEntity<BIWarehouseKpiData> {

	private static final long serialVersionUID = 1L;
	private String warehouse; // 仓库
	private Date date; //KPI日期
	private Date datum;//考勤日期
	private Date dateMonth; // 日期 月
	private Date week;// 在一年当中第几周
	private String strWeek;//
	private String stunden;// 考勤工时
	private String effectiveWorkingHours;// 有效工时合计
	private String standardWorkingHours; // 标准工时
	private String valueAddedHours; // 增值工时
	private String abnormalWorkingHours; // 异常工时
	private String supportWorkingHours; // 支持工时
	private String effectivePercentage;// '=有效工时合计/考勤工时
	private String employeeCount;// 统计员工总数
	private Date beginDate;
	private Date endDate;
	private String CompanyCode;
	@JsonFormat(pattern = "yyyy-MM-dd")
	public Date getDatum() {
		return datum;
	}

	public void setDatum(Date datum) {
		this.datum = datum;
	}
	public String getCompanyCode() {
		return CompanyCode;
	}

	public void setCompanyCode(String companyCode) {
		CompanyCode = companyCode;
	}

	public Date getBeginDate() {
		return beginDate;
	}

	public void setBeginDate(Date beginDate) {
		this.beginDate = beginDate;
	}

	public Date getEndDate() {
		return endDate;
	}

	public void setEndDate(Date endDate) {
		this.endDate = endDate;
	}

	public BIWarehouseKpiData() {
		super();
	}

	public BIWarehouseKpiData(String id) {
		super(id);
	}

	@Length(min = 1, max = 64, message = "仓库长度必须介于 1 和 64 之间")
	@ExcelField(title = "仓库", align = 1, sort = 1)
	public String getWarehouse() {
		return warehouse;
	}

	public void setWarehouse(String warehouse) {
		this.warehouse = warehouse;
	}

	@JsonFormat(pattern = "yyyy-MM-dd")
	@NotNull(message = "日期不能为空")
	@ExcelField(title = "日期", align = 1, sort = 2)
	public Date getDate() {
		return date;
	}

	public void setDate(Date date) {
		this.date = date;
	}

	// @Length(min=1, max=64, message="员工长度必须介于 1 和 64 之间")
	// @ExcelField(title="员工", align=1, sort=3)
	// public String getEmployee() {
	// return employee;
	// }
	//
	// public void setEmployee(String employee) {
	// this.employee = employee;
	// }
	@JsonFormat(pattern = "yyyy-MM")
	@ExcelField(title = "月份", align = 1, sort = 3)
	public Date getDateMonth() {
		return dateMonth;
	}

	public void setDateMonth(Date dateMonth) {
		this.dateMonth = dateMonth;
	}

	
	public Date getWeek() {
		
		return week;
	}

	public void setWeek(Date week) {
		this.week = week;
	}
	
	@ExcelField(title = "星期", align = 1, sort = 4)
	public String getStrWeek() {
		String str="WK"+DateUtils.getWeek(week);
		return str;
	}

	public void setStrWeek(String strWeek) {
		this.strWeek = strWeek;
	}

	@ExcelField(title = "考勤工时", align = 1, sort = 5)
	public String getStunden() {
		return stunden;
	}

	public void setStunden(String stunden) {
		this.stunden = stunden;
	}

	@ExcelField(title = "有效工时合计", align = 1, sort = 6)
	public String getEffectiveWorkingHours() {
		return effectiveWorkingHours;
	}

	public void setEffectiveWorkingHours(String effectiveWorkingHours) {
		this.effectiveWorkingHours = effectiveWorkingHours;
	}

	@ExcelField(title = "标准工时", align = 1, sort = 7)
	public String getStandardWorkingHours() {
		return standardWorkingHours;
	}

	public void setStandardWorkingHours(String standardWorkingHours) {
		this.standardWorkingHours = standardWorkingHours;
	}

	@ExcelField(title = "增值工时", align = 1, sort = 8)
	public String getValueAddedHours() {
		return valueAddedHours;
	}

	public void setValueAddedHours(String valueAddedHours) {
		this.valueAddedHours = valueAddedHours;
	}

	@ExcelField(title = "异常工时", align = 1, sort = 9)
	public String getAbnormalWorkingHours() {
		return abnormalWorkingHours;
	}

	public void setAbnormalWorkingHours(String abnormalWorkingHours) {
		this.abnormalWorkingHours = abnormalWorkingHours;
	}

	@ExcelField(title = "支持工时", align = 1, sort = 10)
	public String getSupportWorkingHours() {
		return supportWorkingHours;
	}

	public void setSupportWorkingHours(String supportWorkingHours) {
		this.supportWorkingHours = supportWorkingHours;
	}

	@ExcelField(title = "有效%", align = 1, sort = 11)
	public String getEffectivePercentage() {
		return effectivePercentage;
	}

	public void setEffectivePercentage(String effectivePercentage) {
		this.effectivePercentage = effectivePercentage;
	}

	@ExcelField(title = "人数", align = 1, sort = 12)
	public String getEmployeeCount() {
		return employeeCount;
	}

	public void setEmployeeCount(String employeeCount) {
		this.employeeCount = employeeCount;
	}
}